with open('test.txt', 'r+', encoding='utf-8') as f:
    data = f.read()
    print('读取文件内容：', data)

# 语句块结束，with生成的对象f会被自动释放
